/*
 * D.cxx
 *
 *  Created on: 11:55:47 AM Sep 21, 2012
 *  Author: Pallab
 *
 * "I have not failed, I have just found 10000 ways that won't work.
 */

#include <iostream>
#include <algorithm>
#include <vector>
#include <sstream>
#include <fstream>
#include <string>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <functional>
#include <bitset>
#include <iomanip>

#include <ctime>
#include <cassert>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <climits>
#include <cstring>
#include <cstdlib>

using namespace std;

#define foR(i1,st,ed) for(int i1 = st , j1 = ed ; i1 < j1 ; ++i1 )
#define fo(i1,ed) foR( i1 , 0 , ed )
#define foE(i1,st,ed) foR( i1, st, ed+1 )
#define foit(i, x) for (typeof((x).begin()) i = (x).begin(); i != (x).end(); i++)
#define bip system("pause")
#define Int long long
#define pb push_back
#define SZ(X) (int)(X).size()
#define LN(X) (int)(X).length()
#define mk make_pair
#define SET( ARRAY , VALUE ) memset( ARRAY , VALUE , sizeof(ARRAY) )
#define line puts("")

inline void wait(double seconds) {
	double endtime = clock() + (seconds * CLOCKS_PER_SEC);
	while (clock() < endtime) {
		;
	}
}

const int MX = 2 * 100005;
namespace KMP {
char s[MX];
char str[MX];
int aut[MX][26];
int lcp[MX];
inline void get_patter(char *_ss, int flag) {
	sprintf(s, "%s", _ss);
	if (flag) {
		reverse(s, s + strlen(s));
	}
}
inline void get_string(char *_ss, int flag) {
	sprintf(str, "%s", _ss);
	if (flag) {
		reverse(str, str + strlen(str));
	}
}
inline void autometa() {
	SET(aut, 0);
	int n = strlen(s);
	for (int i = 0; i < 26; ++i) {
		char current = (char) ('a' + i);
		int pos = -1;
		for (int j = 0; j < n; ++j) {
			if (s[j] == current) {
				pos = j + 1;
			}
			aut[j + 1][i] = pos;
		}
	}
}

inline void compute_lcp() {
	autometa();
	int n = strlen(str);
	int m = strlen(s);
	SET(lcp, 0);
	int indx = 0;

	for (int i = 0; i < n; ++i) {
		if (indx != m && str[i] == s[indx])
			++indx;
		lcp[i] = aut[indx][str[i] - 'a'];
	}
}
}

char str1[MX];
char str2[MX];
int prefix[MX], suffix[MX];
inline void solve() {
	gets(str1);
	gets(str2);

	//---------------------------------------
	KMP::get_patter(str2, 0);
	KMP::get_string(str1, 0);
	KMP::compute_lcp();

	fo(i,strlen(str1)){
		prefix[i] = KMP::lcp[i];
	}
	//---------------------------------------

	KMP::get_patter(str2, 1);
	KMP::get_string(str1, 1);
	KMP::compute_lcp();
	fo(i,strlen(str1)){
		suffix[i] = KMP::lcp[i];
	}
	int n=strlen(str1);
	int m=strlen(str2);
	fo(i,strlen(str1)){
		if( prefix[i]+suffix[n-i-1]<=m ){
			puts("No");return ;
		}
	}

	puts("Yes");

}
int main() {
	int kase = 1;
#if !defined ( ONLINE_JUDGE )
	freopen("in", "r", stdin);
	kase = 1;
#endif
	fo(i,kase)
	{
		solve();
	}
	return 0;
}

